<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>搜索</title>

    <link
      rel="shortcut icon"
      href="https://static.jyshare.com/images/favicon.ico"
    />
    <link
      rel="stylesheet"
      href="//at.alicdn.com/t/c/font_4522611_wieqaqu8q4.css"
    />

    <link rel="stylesheet" href="<?php echo DIR_PUBLIC; ?>/css/reset.css" />
    <link rel="stylesheet" href="<?php echo DIR_PUBLIC; ?>/css/public.css" />
    <link rel="stylesheet" href="<?php echo DIR_PUBLIC; ?>/css/list_son.css" />
  </head>

  <body>
    <div class="header">
      <div class="logo">
        <a href="http://127.24.6.11/">智慧璇玑</a>
      </div>
      <div class="banner">
        <a href="http://127.24.6.11/">首页</a>
        <a href="<?php echo DIR_MODEL; ?>/publish.php">新帖</a>
        <a href="<?php echo DIR_MODEL; ?>/list_father.php">话题</a>
      </div>
      <div class="put">
        <form action="<?php echo DIR_MODEL; ?>/list_son.php">
          <input type="text" name="keyword" />
          <button>搜索</button>
        </form>
      </div>
      <ul>
        <li>
          <a href="<?php echo DIR_MODEL; ?>/login.php">登录</a>&nbsp;/&nbsp;
          <a href="<?php echo DIR_MODEL; ?>/register.php">注册</a>
        </li>
        <li>
          <a href="<?php echo DIR_MODEL; ?>/upload_img.php">
            <span class="iconfont icon-geren"></span>&nbsp;个人中心
          </a>
        </li>
        <li>
          <a href="./model/logout.php">
            <span class="iconfont icon-kaiguan"></span>&nbsp;注销
          </a>
        </li>
      </ul>
    </div>

    <div class="content">
      <div class="main">
        <div class="left">
          <h3>云计算</h3>

          <div class="num">
            今日：<span>7</span>&nbsp;&nbsp; 总帖：<span>51235</span>
            <div class="moderator">
              子版块： <a href="#">云计算</a>&gt;
              <a href="#">大数据</a>
            </div>
          </div>

          <div class="pages-wrap">
            <ul class="post-list">
              <?php while($row = mysql_fetch_assoc($result)): ?>
              <?php
                $rep_sql = "SELECT MAX(rep_time) as last_time, COUNT(*) as rep_num FROM reply WHERE rep_pub_id = {$row['pub_id']}";
                $rep_result = my_query($rep_sql);
                $rep_row = mysql_fetch_assoc($rep_result);
                $last_time = $rep_row['last_time'];
                $rep_num = $rep_row['rep_num'];
                ?>
              <li>
                <div class="small-pic">
                  <a href="#">
                    <img
                      src="../uploads/images/<?php echo $row['user_image']; ?>"
                      alt=""
                    />
                  </a>
                </div>
                <div class="subject">
                  <div class="title-wrap">
                    <p>[帖子]</p>
                    <h2>
                      <a
                        href="./show.php?pub_id=<?php echo $row['pub_id']; ?>&action=reply"
                      >
                        <?php echo str_replace($keyword, "$keyword", $row['pub_title']); ?>
                      </a>
                    </h2>
                  </div>
                  <p>
                    楼主：<?php echo $row['pub_owner']; ?>&nbsp;<br /><br />
                    <?php echo date('Y-m-d H:i:s', $row['pub_time']); ?>&nbsp;
                    最后回复：<?php echo $rep_num == 0 ? "暂无回复" : date('Y-m-d H:i:s', $last_time); ?>
                  </p>
                </div>
                <div class="count">
                  <p>
                    回复<br /><span><?php echo $rep_num; ?></span>
                  </p>
                  <p>
                    浏览<br /><span><?php echo $row['pub_hits']; ?></span>
                  </p>
                </div>
              </li>
              <?php endwhile; ?>
            </ul>
          </div>
          <div class="pages">
            <?php echo $strPage; ?>
          </div>
        </div>

        <div class="right">
          <div class="class-list">
            <div class="title">模块列表</div>
            <ul class="list-wrap">
              <li>
                <h2><a href="#">全媒体</a></h2>
                <ul>
                  <li>
                    <span class="iconfont icon-jianji"></span>
                    <h3><a href="">剪辑</a></h3>
                  </li>
                  <li>
                    <span class="iconfont icon-duanshipin"></span>
                    <h3><a href="">短视频</a></h3>
                  </li>
                  <li>
                    <span class="iconfont icon-yunying"></span>
                    <h3><a href="">运营</a></h3>
                  </li>
                </ul>
              </li>
              <li>
                <h2><a href="#">云计算</a></h2>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>

    <div class="footer">
      <div class="footer-title">智慧璇玑</div>
      <div class="footer-content">
        Copyright &copy; 2024 智慧璇玑 All Rights Reserved
      </div>
    </div>
  </body>
</html>
